#!/bin/sh -e
###
 # @Filename: start.sh
 # @Author: libo
 # @LastEditTime: 2024-05-29
 # @Descripttion: 在sidecar容器中将应用程序解压到web容器中.
###

WORK_HOME=/app/work
pwd && ls
if [ ! ${APPS_HOME} ];then
    APPS_HOME="/app/apps"
fi

echo "APPS_HOME: ${APPS_HOME}"
if [ ! ${APP_NAME} ];then
    APP_NAME="ROOT"
fi
echo "APP_NAME: ${APP_NAME}"

# tar -zxvf ${WORK_HOME}/*.tar.gz -C ${APPS_HOME}
cp -vr ${WORK_HOME}/* ${APPS_HOME}/${APP_NAME}.war

echo "done."